<div class="order">
	<h1>Your Order Details</h1>
<?php
	$id=$_POST['id'];
	$brand=$_POST['brand'];
	$model=$_POST['model'];
	$color=$_POST['color'];
	$price=$_POST['price'];
	$description=$_POST['description'];
	$year_of_make=$_POST['year_of_make'];
	$date_from=$_POST['date_pick_from'];
	$date_to=$_POST['date_pick_to'];
	//echo $brand . $model . $color . $year_of_make . $date_from . $date_to;
	$duration = (strtotime($date_to) - strtotime($date_from))/86400;
	//echo "Total days = " . $duration;
	$total_price=$price*$duration;
	//echo "Total price=" . $total_price . " Euro";
?>

    <div class="order_details">
    
        Brand:<?php echo  $brand?> <br>
        Model:<?php echo  $model?> <br>
        Color:<?php echo  $color?> <br>
        Year of Make:<?php echo  $year_of_make?> <br>
        Price per day:<?php echo  $price ?> <br>
        From(date):<?php echo  $date_from?> <br>
        To(date):<?php echo  $date_to?> <br>
        Total Days:<?php echo  $duration?> <br>
        Total Price:<?php echo  $total_price . " Euro"?> <br>
        Order Number:
		<?php 
		getrandmax();
		$order_num=rand(1,10000000000);
		echo $order_num;
		?>
    </div>
    <?php
	//ta stoixeia pou bainoun ston pinaka order
	echo"<form action='order_confirmation.php' method='post'>
				<input type='hidden' value='$id' name='id'>
				<input type='hidden' value='$date_from' name='date_from'>
				<input type='hidden' value='$date_to' name='date_to'>
				<input type='hidden' value='$order_num' name='order_num'>
				<input type='hidden' value='$total_price' name='total_price'>
				<input type='submit' value='Confirm Order'>
		 </form>";
	?>
    

</div>